class Mylist(object):
    def __init__(self):
        self.container =[]
    def add(self,item):
        self.container.append(item)

mylist=Mylist()
mylist.add(1)
mylist.add(2)
mylist.add(3)
for i in mylist.container:
    print(i)


from collections import Iterable